<template>
  <div :class="{My_advert: flag, My_advert_user: !flag}">
    <slot name="advert" >
      <img src="http://liufusong.top:8080/img/profile/join.png" alt="">
    </slot>
  </div>
</template>

<script>

export default {
  name: 'MyAdvert',
  props: {
    token: {
      type: [String, Object],
      required: true
    }
  },

  data () {
    return {
      flag: true
    }
  },
  created () {
    if (this.token) this.flag = !this.flag
  },
  methods: {}
}
</script>

<style scoped>
.My_advert {
  position: absolute;
  width: 90%;
  top: 260%;
  left: 50%;
  transform: translateX(-50%);
}
.My_advert_user {
  position: absolute;
  width: 90%;
  top: 151%;
  left: 50%;
  transform: translateX(-50%);
}

.My_advert img {
width: 100%;
}
.My_advert_user img {
width: 100%;
}
</style>
